﻿using Application.Dto;
using Domain.Entitys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.IAppSrevices
{
    public interface IUserService
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="userLogin"></param>
        /// <returns></returns>
        Task<User> Login(UserLogin userLogin);

        /// <summary>
        /// 根据角色编号查询对应的角色职位
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UR GetUR(int id);

        /// <summary>
        /// 查询全部用户角色
        /// </summary>
        /// <returns></returns>
        List<UR> URFill1(int a, int b);
        List<UR> URFill();
        int URCount();

        /// <summary>
        /// 根据用户id查询角色ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UserRoles UserRroesById(int uid);
        /// <summary>
        /// 修改用户角色表
        /// </summary>
        /// <param name="userRoles"></param>
        /// <returns></returns>
        int UserRroesUpdate(UserRoles userRoles);
        /// <summary>
        /// 查询最后一条用户数据
        /// </summary>
        /// <returns></returns>
        User UserDesc();
        /// <summary>
        /// 添加用户角色表
        /// </summary>
        /// <param name="userRoles"></param>
        /// <returns></returns>
        int UserRolesAdd(UserRolesAddDto userRolesAddDto);
        /// <summary>
        /// 删除角色数据
        /// </summary>
        /// <param name="roles"></param>
        /// <returns></returns>
        int RolesDelete(RoleDeleteDto  roleDeleteDto);
        List<User> UsersFill();
    }
}
